@import "./_variables.css";
@import "./_columns.css";
@import "./elements/_notification.css";
@import "./elements/_button.css";
@import "./elements/_icon.css";
@import "./elements/_content.css";
@import "./elements/_delete.css";
@import "./elements/_image.css";
@import "./elements/_progress.css";
@import "./elements/_table.css";
@import "./elements/_tag.css";
@import "./elements/_title.css";
@import "./elements/_box.css";
@import "./components/_breadcrumb.css";
@import "./components/_card.css";
@import "./components/_dropdown.css";
@import "./components/_menu.css";
@import "./components/_message.css";
@import "./components/_modal.css";
@import "./components/_navbar.css";
@import "./components/_pagination.css";
@import "./components/_panel.css";
@import "./components/_tabs.css";
@import "./_helpers.css";
@import "./_form.css";

/* reset  */

html {
    box-sizing: border-box;
    font-size: 16px;
}

* {
    box-sizing: inherit;
}

*:before,
*:after {
    box-sizing: inherit;
}

html,
body,
p,
ol,
ul,
li,
dl,
dt,
dd,
blockquote,
figure,
fieldset,
legend,
textarea,
pre,
iframe,
hr,
h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    padding: 0;
}

html {
    box-sizing: border-box;
}

* {
    box-sizing: inherit;
}

*:before,
*:after {
    box-sizing: inherit;
}

body {
    color: #4a4a4a;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
}

body,
button,
input,
select,
textarea {
    font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
}

a {
    color: #3273dc;
    cursor: pointer;
    text-decoration: none;
}

pre {
    color: gray(74);
    font-size: .875em;
}

img {
    height: auto;
    max-width: 100%;
}

code {
    color: red;
}


/* custom medias */


/* variables */

:root {
    --background-color: whitesmoke;
    --gap: 32px;
    --desktop: calc(960px+ 2 * 32px);
    --widescreen: 1152px;
    --fullhd: 1344px;
    --footer-background-color: var(--background-color);
    --primary: turquoise;
}


/* elements */

a {
    text-decoration: none;
    color: #3273dc;
    text-decoration: none;
}

a:hover {
    color: #363636;
}


/* modifiers */

.has-text-centered {
    text-align: center !important;
}


/* layout */

.footer {
    background-color: var(--footer-background-color);
    padding: 3rem 1.5rem 6rem;
}

.container {
    position: relative;
    margin: 0 auto;
    @media (--bt-desktop) {
        width: calc(var(--desktop) - 2 * var(--gap));
        max-width: calc(var(--desktop) - 2 * var(--gap));
        &.is-fluid {
            margin: 0 var(--gap);
            max-width: none;
            width: auto;
        }
    }
    @media (--st-widescreen) {
        /**
    is-widescreen will make container fullwidth until widescreen breakpoint,
    namely, grow until breakpoint.
    vice versa, container's width will JUMP when widescreen breakpoint
    */
        &.is-widescreen {
            width: calc(var(--widescreen) - 2 * var(--gap));
            max-width: calc(var(--widescreen) - 2 * var(--gap));
        }
    }
    @media (--bt-widescreen) {
        width: calc(var(--widescreen) - 2 * var(--gap));
        max-width: calc(var(--widescreen) - 2 * var(--gap));
    }
    @media (--st-fullhd) {
        &.is-fullhd {
            width: calc(var(--fullhd) - 2 * var(--gap));
            max-width: calc(var(--fullhd) - 2 * var(--gap));
        }
    }
    @media (--bt-fullhd) {
        width: calc(var(--fullhd) - 2 * var(--gap));
        max-width: calc(var(--fullhd) - 2 * var(--gap));
    }
}

.level {
    align-items: center;
    justify-content: space-between;
    &.is-mobile {
        display: flex !important;
        & .level-item {
            margin-right: .75rem;
            &:not(.is-narrow) {
                flex-grow: 1;
            }
            &:not(:last-child) {
                margin-bottom: 0;
            }
        }
    }
    @media (--bt-mobile) {
        display: flex;
    }
    & .level-left {
        flex: 0 0 auto;
        align-items: center;
        justify-content: flex-start;
        @media (--bt-mobile) {
            display: flex;
        }
    }
    & .level-right {
        flex: 0 0 auto;
        align-items: center;
        justify-content: flex-end;
        @media (--bt-mobile) {
            display: flex;
        }
        @media (--st-mobile) {
            margin-top: 1.5rem;
        }
    }
}

.level-item {
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    display: flex;
    @media (--bt-mobile) {
        flex-grow: 1;
    }
    @media (--st-mobile) {
        &:not(: last-child) {
            margin-bottom: 0.75rem;
        }
    }
}

.control {
    font-size: 1rem;
    text-align: left;
    position: relative;
    &:first-child .input {
        border-top-left-radius: 3px;
        border-bottom-left-radius: 3px;
    }
    &:last-child .button {
        border-top-right-radius: 3px;
        border-bottom-right-radius: 3px;
    }
}

.input {
    appearance: none;
    align-items: center;
    border: 1px solid transparent;
    display: inline-flex;
    font-size: 1rem;
    /* 使用em以方便使高度根据字体大小调整  */
    height: 2.25em;
    justify-content: flex-start;
    line-height: 1.5;
    padding-bottom: calc(0.375em - 1px);
    padding-left: calc(0.625em - 1px);
    padding-right: calc(0.625em - 1px);
    padding-top: calc(0.375em - 1px);
    position: relative;
    vertical-align: top;
    background-color: white;
    border-color: #dbdbdb;
    color: #363636;
    &::placeholder {
        color: color(#363636 a(30%));
    }
    max-width: 100%;
    width: 100%;
    box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.1);
    &.is-primary {
        border-color: var(--primary);
    }
    &.is-info {
        border-color: var(--info);
    }
    &.is-small {
        font-size: .75rem;
        border-radius: 2px;
    }
    &.is-medium {
        font-size: 1.25rem;
        border-radius: 4px;
    }
    &.is-large {
        font-size: 1.5rem;
        border-radius: 8px;
    }
    &.is-hovered,
    &:hover {
        border-color: #b5b5b5;
    }
    &.is-focused,
    &:focus {
        border-color: #3273dc;
        box-shadow: 0 0 0 0.125em rgba(50, 115, 220, 0.25);
    }
    &[disabled] {
        background-color: whitesmoke;
        border-color: whitesmoke;
        box-shadow: none;
        color: #7a7a7a;
        &::placeholder {
            color: color(#7a7a7a a(30%));
        }
    }
    &[readonly] {
        box-shadow: none;
        &::placeholder {
            color: #363636;
        }
    }
    &.is-static {
        background: transparent;
        border: none;
        box-shadow: none;
        padding-left: 0;
        padding-right: 0;
    }
}

/* typography */

.is-5 {
    font-size: 1.25rem;
}

.heading {
    display: block;
    font-size: 11px;
    letter-spacing: 1px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.media {
    display: flex;
    align-items: flex-start;
    text-align: left;
    & .content:not(: last-child) {
        margin-bottom: .75rem;
    }
    & .media {
        border-top: 1px solid rgba(219, 219, 219, 0.5);
        padding-top: .75rem;
    }
    & .media+.media {
        margin-top: .75rem;
    }
    &+.media {
        margin-top: .75rem;
        padding-top: .75rem;
        border-top: 1px solid rgba(219, 219, 219, 0.5);
    }
}

.media-left {
    margin-right: 1rem;
    flex: 0 0 auto;
}

.media-right {
    margin-left: 1rem;
    flex: 0 0 auto;
}

.media-content {
    text-align: left;
    flex: 1 1 auto;
    overflow: auto;
}

.field {
    &.is-horizontal {
        display: flex;
        align-items: center;
        & .field-label {
            margin-right: 1.5rem;
            text-align: right;
            flex: 1 0 0;
        }
        & .field-body {
            flex: 5 1 0;
        }
    }
    &:not(:last-child) {
        margin-bottom: .75rem;
    }

    &.is-grouped {
        display: flex;
        justify-content: flex-start;

        & .control:not(:last-child) {
            margin-bottom: 0;
            margin-right: .75rem;
        }

        &.is-grouped-multiline {
            flex-wrap: wrap;

            & .control {
                margin-bottom: .75rem;
            }
        }
    }

    &.has-addons {
        display: flex;
        justify-content: flex-start;

        & .button {
            border-radius: 0;
            border-left-width: 0px;
        }

        & .control:first-child .button {
            border-top-left-radius: 3px;
            border-bottom-left-radius: 3px;
            border-left-width: 1px;
        }
        & .control:last-child .button {
            border-top-right-radius: 3px;
            border-bottom-right-radius: 3px;
        }
    }
}

@keyframes spinAround {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(359deg);
    }
}

.control {
    font-size: 1rem;
    position: relative;
    &.is-loading {
        &::after {
            animation: spinAround 500ms infinite linear;
            border: 2px solid #dbdbdb;
            border-radius: 290486px;
            border-right-color: transparent;
            border-top-color: transparent;
            content: "";
            display: block;
            height: 1em;
            width: 1em;
            position: absolute !important;
            top: calc(50% - .5em);
            right: 0.625em;
        }
        &.is-small::after {
            height: .75em;
            width: .75em;
            top: calc(50% - .75em / 2);
        }
        &.is-large::after {
            height: 1.5em;
            width: 1.5em;
        }
    }
    &[class*='has-icons-'] {
        & .icon {
            top: 0;
            color: #dbdbdb;
            position: absolute !important;
            height: 2.25em;
            width: 2.25em;
            z-index: 4;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        & .input.is-small~.icon {
            font-size: .75rem;
        }
        & .input.is-large~.icon {
            font-size: 1.5rem;
        }
        & .icon.is-left {
            left: 0;
        }
        & .icon.is-right {
            right: 0;
        }
    }
    &.has-icons-left {
        & .input, & select {
            padding-left: 2.25em;
        }
    }
    &.has-icons-right .input {
        padding-right: 2.25em;
    }
}


.checkbox,
.radio {
    display: inline-block;
    cursor: pointer;
    line-height: 1.25;
}

.hero {
    display: flex;
    align-items: stretch;
    & .hero-body {
        flex: 1 0 auto;
        padding: 3rem 1.5rem;
    }
    &.is-primary {
        background-color: var(--primary);
        & .title,
        & .subtitle {
            color: white;
        }
    }
    &.is-bold {}
}

.section {
    padding: 3rem 1.5rem;
    @media (--bt-desktop) {
        &.is-medium {
            padding: 9rem 1.5rem;
        }
        &.is-large {
            padding: 18rem 1.5rem;
        }
    }
}

.label {
    color: #363636;
    font-weight: 700;
    display: block;
}
